Jesus tells His disciples about a future in which they will be persecuted for their faith. They will be handed over for punishment and face difficult times; they may even find themselves in situations where their lives are at risk. Amidst these terrible events, Jesus tells the disciples not to worry about what they will say.
Instead, He says that the Holy Spirit will come to them and give them the right words at that moment. In other words, our task is not to worry about what will happen, but to trust the Holy Spirit and speak when the time comes.